package org.jmh.util;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Data

public class PageInfo<T> {
    // 如果 total = 0 那么返回是的是一个 new PageInfo<T>()
    private Long total = 0L;
    private List<T> list = new ArrayList<>();
    private Map<String,Object> objData;

    public PageInfo() {
    }

    public PageInfo(Long total, List<T> list, Map<String, Object> objData) {
        this.total = total;
        this.list = list;
        this.objData = objData;
    }

    public PageInfo(Long total, List<T> list) {
        this.total = total;
        this.list = list;
    }
}
